<script setup lang="ts">
import { ElTableColumn } from 'element-plus'

defineProps({
  thData: {
    type: Object
  }
})
</script>

<template>
  <el-table-column
    v-if="!thData.children"
    :prop="thData.dataIndex"
    :label="thData.title"
    align="center"
    :sortable="thData.sortable"
    :show-overflow-tooltip="thData.showOverflowTooltip"
  />
  <el-table-column v-else :label="thData.title" align="center">
    <SytTableColumn v-for="item of thData.children" :key="item.dataIndex" :th-data="item" />
  </el-table-column>
</template>

<style scoped></style>
